#coding=utf-8
def ConvertFixedIntegerToComplement(fixedInterger):
    return bin(fixedInterger)[2:]

def ConvertFixedDecimalToComplement(fixedDecimal):
    fixedpoint = int(fixedDecimal) / (10.0**len(fixedDecimal))
    s = ""
    while fixedDecimal != 1.0 and len(s) < 23:
        fixedpoint = fixedpoint * 2.0
        s += str(fixedpoint)[0]
        fixedpoint = fixedpoint if str(fixedpoint)[0] == "0" else fixedpoint - 1.0
        return s

def ConvertToExponentMarker(number):
    return bin(number + 127)[2:].zfill(8)

def ConvertToFloat(floatingPoint):
    floatingPointString = str(floatingPoint)
    if floatingPointString.find("-") != -1:
        sign = "1"
        floatingPointString = floatingPointString[1:]
    else:
        sign = "0"
    l = floatingPointString.split(".")
    front = ConvertFixedIntegerToComplement(int(l[0]))
    rear = ConvertFixedDecimalToComplement(l[1])
    floatingPointString = front + "." + rear
    relativePos = floatingPointString.find(".") - floatingPointString.find("1")
    if relativePos > 0:
        exponet = ConvertToExponentMarker(relativePos-1)
        mantissa = floatingPointString[floatingPointString.find("1")+1:floatingPointString.find(".")] + floatingPointString[floatingPointString.find(".")+1:]
    else:
        exponet = ConvertToExponentMarker(relativePos)
        mantissa = floatingPointString[floatingPointString.find("1")+1:]
    mantissa = mantissa[:23] + "0" * (23 - len(mantissa))
    floatingPointString = "0b" + sign + exponet + mantissa
    print(floatingPointString)
    return hex( int( floatingPointString , 2))
x = ConvertToFloat(input("输入一个十进制浮点数："))
print(x)